package www.superbytecode.com.enums;

import www.superbytecode.com.constant.Constant;

/**
 * All rights Reserved, Designed By www.super-bytecode.com
 *
 * @ProjectName superbytecode-builder
 * @Package www.superbytecode.com.generator.enums
 * @ClassName DBType
 * @Description 数据源类型
 * @Author [Lance Ting]
 * @Date 2020/7/14 20:37
 * @Version V1.0
 * @Copyright: 2020 www.super-bytecode.com Inc. All rights reserved.
 * @TODO：本文件Lance Ting所作,如果转载或使用请标明具体出处!
 **/
public enum DBType {
    /**
     *
     */
    MySQL(Constant.DRIVER_MYSQL, Constant.CONNECTION_MYSQL, "mysql-connector-java-5.1.38.jar"),
    Oracle(Constant.DRIVER_ORACLE, Constant.CONNECTION_ORACLE, "ojdbc14.jar"),
    PostgreSQL(Constant.DRIVER_POSTGRESQL, Constant.CONNECTION_POSTGRESQL, "postgresql-9.4.1209.jar");

    /**
     * 数据库连接驱动
     */
    private final String driverClass;
    /**
     * 数据库连接
     */
    private final String connectionUrlPattern;// 数据库连接
    /**
     * 连接文件
     */
    private final String connectorJarFile;

    DBType(String driverClass, String connectionUrlPattern, String connectorJarFile) {
        this.driverClass = driverClass;
        this.connectionUrlPattern = connectionUrlPattern;
        this.connectorJarFile = connectorJarFile;
    }

    public String getDriverClass() {
        return driverClass;
    }

    public String getConnectionUrlPattern() {
        return connectionUrlPattern;
    }

    public String getConnectorJarFile() {
        return connectorJarFile;
    }
}